package com.qf.ayc.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private Interceptor tokenInterceptor;
    //后台管理人员在
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenInterceptor)
                .addPathPatterns("/address/getaddress","/address/getaaddr","/address/edit","/address/deladdr") ; // 这里使用 /** 来匹配所有路径
//                .excludePathPatterns("/users/login", "/users/register","/AYC/customers/login","/AYC/customers/register");
//                .addPathPatterns("/users/login/**");
//              .addPathPatterns("/pay/geturl","/pay/query");


    }
}

